# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-power-manager
pkgver=43.0
pkgrel=1
pkgdesc="System power information and statistics"
url="https://gitlab.gnome.org/GNOME/gnome-power-manager"
arch=(loong64 x86_64)
license=(GPL)
depends=(gtk3 upower dconf)
makedepends=(git meson)
options=(debug)
_commit=98f8ac8275d413f141a3f422e731e3213fc1db03  # tags/GNOME_POWER_MANAGER_43_0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-power-manager.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^GNOME_POWER_MANAGER_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
